﻿using System;

namespace ELW.Library.Math.Calculators.Standard
{
    class CalculatorGREATER : IOperationCalculator
    {
        #region IOperationCalculator Members

        public double Calculate(params double[] parameters)
        {
            if (parameters == null)
                throw new ArgumentNullException("parameters");
            if (parameters.Length != 2)
                throw new ArgumentException("It is binary operation. Parameters count should be equal to 2.", "parameters");
            //
            if (parameters[0] > parameters[1])
                return 1.0;
            else
                return 0.0;
        }

        #endregion
    }
}
